import * as types from './mutations-types';
import { fs } from 'fs';
// import axios from 'axios'

const mutations = {
    [types.SET_TOKEN](state, token) {
        state.token = token;
        localStorage.setItem("x-auth-token", token);
    },
    [types.DEL_TOKEN](state) {
        state.token = '';
        localStorage.removeItem("x-auth-token");
    },
    [types.SET_PERMISSIONS](state, permissions = []) {
        state.permissions = permissions
    }
   
}
export default mutations;